﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DLL;
using Module;

namespace BLL
{
    public class BArea
    {
        #region 字段

        private DArea APP = new DArea();//数据操作对象
        private static BArea instance;

        #endregion

        #region 公共接口

        /// <summary>
        /// 取得
        /// </summary>
        /// <returns>BArea对象</returns>
        public static BArea getInstance()
        {
            if (instance == null)
            {
                instance = new BArea();
            }
            return instance;
        }


         /// <summary>
        /// 根据上级行政Id获取所有下级所有行政地区
        /// </summary>
        /// <returns></returns>
        public List<AreaInfo> GetAreaByParentId(long parentId)
        {           
            return APP.GetAreaByParentId(parentId);
        }

        /// <summary>
        /// 获取所有行政区域
        /// </summary>
        /// <returns></returns>
        public List<AreaInfo> GetALLArea()
        {
            return APP.GetALLArea();
        }
        #endregion
    }
}
